package com.example.lanqiaodemo1.JavaTest;

//import java.util.Scanner;
//
//public class Calculate {
//    double sum=0;
//    int count;
//    int[] value=new int [100];
//    public static void main(String[] args) {
//        Calculate calculate = new Calculate();
//        Scanner a=new Scanner(System.in);
//        calculate.count=a.nextInt();
//        for(int i=0;i<calculate.count;i++) {
//            calculate.value[i] = a.nextInt();
//            calculate.getSum(calculate.value[i]);
//        }
//        calculate.getBigger(calculate.getAverage(calculate.count));
//        System.out.println(calculate.sum);
//        System.out.println(calculate.getAverage(calculate.count));
//    }
//    public void getBigger(double c){
//        for (int i=0;i<count;i++){
//            if (value[i]> c)
//                System.out.println(value[i]);
//        }
//    }
//    public void getSum(double a){
//        sum+=a;
//    }
//    public double getAverage(double a){
//        return sum/a;
//    }
//
//}
import java.util.Scanner;
public class Calculate {
    int sum;
    int average;
    Scanner sc = new Scanner(System.in);
    int count=sc.nextInt();
    int[] arry = new int[count];



    public int[] getArry() {
        for (int i = 0; i < count; i++) {
            arry[i] = sc.nextInt();
        }
        return arry;
    }

    public int getSum() {
        int count = arry.length;
        for (int i = 0; i < count; i++) {
            sum = sum + arry[i];
        }
        return sum;
    }

    public double getAverage() {
        int count = arry.length;
        average = sum / count;
        return average;
    }

    public void Big() {
        for (int i = 0; i < arry.length; i++) {
            if (arry[i] > average) {
                System.out.print(arry[i] + " ");
            }
        }
    }

    public static void main(String[] args) {
        Calculate c = new Calculate();
        int a = c.getSum();
        double b = c.getAverage();
        System.out.println(a);
        System.out.println(b);
        c.Big();
    }

}
